/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "song_publishers")
//@NamedQueries({@NamedQuery(name = "SongPublishers.findAll", query = "SELECT s FROM SongPublishers s"), @NamedQuery(name = "SongPublishers.findByPublisherId", query = "SELECT s FROM SongPublishers s WHERE s.publisherId = :publisherId"), @NamedQuery(name = "SongPublishers.findByName", query = "SELECT s FROM SongPublishers s WHERE s.name = :name"), @NamedQuery(name = "SongPublishers.findByCountry", query = "SELECT s FROM SongPublishers s WHERE s.country = :country"), @NamedQuery(name = "SongPublishers.findByIsrcRegistrantCode", query = "SELECT s FROM SongPublishers s WHERE s.isrcRegistrantCode = :isrcRegistrantCode"), @NamedQuery(name = "SongPublishers.findByReportingDestination", query = "SELECT s FROM SongPublishers s WHERE s.reportingDestination = :reportingDestination")})
public class SongPublishers implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "publisherId")
    private Integer publisherId;
    @Column(name = "name")
    private String name;
    @Basic(optional = false)
    @Column(name = "country")
    private String country;
    @Column(name = "isrcRegistrantCode")
    private String isrcRegistrantCode;
    @Column(name = "reportingDestination")
    private String reportingDestination;

    public SongPublishers() {
    }

    public SongPublishers(Integer publisherId) {
        this.publisherId = publisherId;
    }

    public SongPublishers(Integer publisherId, String country) {
        this.publisherId = publisherId;
        this.country = country;
    }

    public Integer getPublisherId() {
        return publisherId;
    }

    public void setPublisherId(Integer publisherId) {
        this.publisherId = publisherId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getIsrcRegistrantCode() {
        return isrcRegistrantCode;
    }

    public void setIsrcRegistrantCode(String isrcRegistrantCode) {
        this.isrcRegistrantCode = isrcRegistrantCode;
    }

    public String getReportingDestination() {
        return reportingDestination;
    }

    public void setReportingDestination(String reportingDestination) {
        this.reportingDestination = reportingDestination;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (publisherId != null ? publisherId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof SongPublishers)) {
            return false;
        }
        SongPublishers other = (SongPublishers) object;
        if ((this.publisherId == null && other.publisherId != null) || (this.publisherId != null && !this.publisherId.equals(other.publisherId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.SongPublishers[publisherId=" + publisherId + "]";
    }

}
